package cn.ffcs.businessrequest.model;


import java.util.Date;

import org.apache.commons.lang.StringUtils;

import cn.ffcs.base.model.BaseEntity;
import cn.ffcs.bpm.model.BizProcessManage;
import cn.ffcs.organ.model.Organization;
import cn.ffcs.organ.model.Person;
import cn.ffcs.system.dict.model.Dict;

/**
 * 产品改进需求单类：定义基本属性<br/>
 * <table>
 * <tr>
 * <td>负责人/principal:</td>
 * <td colspan="2">g.pany</td>
 * <tr>
 * <td>修改记录/revision:</td>
 * <td colspan="2"></td>
 * </tr>
 * <tr>
 * <td>日期:2010-1-8</td>
 * <td>修改人:g.pany</td>
 * <td>修改说明:</td>
 * </tr>
 * <tr>
 * <td></td>
 * <td></td>
 * <td></td>
 * </tr>
 * </table>
 * @author g.pany
 * @version $Id$
 */

public class ProdReq extends BaseEntity
{
    
    /** TODO 请输入字段日志 */
    private static final long serialVersionUID = -3509714198798356920L;
    
    /** 需求名称**/
    private String name;

    /** 需求单编号，暂时保留。参考IT需求编号，如FJ+年+排序号**/
    private String reqCode;
    
    /** 需求内容**/
    private String content;

    /** 重要性**/
    private Dict importance;

    /** 需求类型**/
    private Dict type;
    
    /** 发起部门**/
    private Person startPerson;
    
    /** 发起部门**/
    private Organization startDept;

    /** 产品经理**/
    private Person prodPerson;

    /** 产品部门**/
    private Organization prodDept;

    /** 关联产品**/
    private String relaProd;
    
    /** 需求提出时间**/
    private Date advanTime;
    
    /** 关联的正式需求单**/
    private BusinessRequest relaReq;

    /** 公文编号**/
    private String officialNo;

    /** 公文名称**/
    private String officialName;

    /** 备注**/
    private String remark;
    
    private boolean isRep=true;
    public Date getAdvanTime()
    {
        return advanTime;
    }

    public void setAdvanTime(Date advanTime)
    {
        this.advanTime = advanTime;
    }

    public String getContent()
    {    	
        return content;
    }
    
    public void replaceContentNtoBR(){
    	content=StringUtils.replace(content, "\n", "<br/>");
    }

    public void replaceContentBRtoN(){
    	content=StringUtils.replace(content, "<br/>", "\n");
    }
    
    public void setContent(String content)
    {
        this.content = content;
    }

    public Dict getImportance()
    {
        return importance;
    }

    public void setImportance(Dict importance)
    {
        this.importance = importance;
    }

    public String getName()
    {
        return name;
    }

    public void setName(String name)
    {
        this.name = name;
    }

    public Organization getProdDept()
    {
        return prodDept;
    }

    public void setProdDept(Organization prodDept)
    {
        this.prodDept = prodDept;
    }

    public Person getProdPerson()
    {
        return prodPerson;
    }

    public void setProdPerson(Person prodPerson)
    {
        this.prodPerson = prodPerson;
    }

    public String getRelaProd()
    {
        return relaProd;
    }

    public void setRelaProd(String relaProd)
    {
        this.relaProd = relaProd;
    }

    public String getReqCode()
    {
        return reqCode;
    }

    public void setReqCode(String reqCode)
    {
        this.reqCode = reqCode;
    }

    public Organization getStartDept()
    {
        return startDept;
    }

    public void setStartDept(Organization startDept)
    {
        this.startDept = startDept;
    }

    public Person getStartPerson()
    {
        return startPerson;
    }

    public void setStartPerson(Person startPerson)
    {
        this.startPerson = startPerson;
    }

    public Dict getType()
    {
        return type;
    }

    public void setType(Dict type)
    {
        this.type = type;
    }

    public String getOfficialName()
    {
        return officialName;
    }

    public void setOfficialName(String officialName)
    {
        this.officialName = officialName;
    }

    public String getOfficialNo()
    {
        return officialNo;
    }

    public void setOfficialNo(String officialNo)
    {
        this.officialNo = officialNo;
    }

    public String getRemark()
    {
        return remark;
    }

    public void setRemark(String remark)
    {
        this.remark = remark;
    }

    public BusinessRequest getRelaReq()
    {
        return relaReq;
    }

    public void setRelaReq(BusinessRequest relaReq)
    {
        this.relaReq = relaReq;
    }

	public void setRep(boolean isRep) {
		this.isRep = isRep;
	}

}
